//package com.library.controller;
//
//import java.io.IOException;
//
//import javax.servlet.FilterChain;
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebFilter;
//import javax.servlet.http.HttpFilter;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//@WebFilter("/*")
//public class LoginFilter extends HttpFilter{
//	@Override
//	protected void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
//			throws IOException, ServletException {
//		// TODO Auto-generated method stub
//		String uri =request.getRequestURI();
//		if(uri.contains("login.jsp")||uri.contains("login.do")) {
//			super.doFilter(request, response, chain);
//		}
//		if(request.getSession().getAttribute("loginAdmin")!=null){
//			super.doFilter(request,response,chain);
//		}else{
//			response.sendRedirect("login.jsp");
//		}
//		
//	}
//}
